import request from './request'

// 进货单
export function list(data) {
  return request.get('supplier/list', data)
}

export function create(data) {
  return request.post('supplier/save', data)
}

export function detail(id, data = {}) {
  return request.get('supplier/detail/' + id, data)
}

export function getSupplierSn(data = {}) {
  return request.get('supplier/getSupplierSn', data)
}

// 退货单
export function refundList(data) {
  return request.get('supplier/refund/list', data)
}

export function refundCreate(data) {
  return request.post('supplier/refund/save', data)
}

export function refundDetail(id, data = {}) {
  return request.get('supplier/refund/detail/' + id, data)
}

// 库存
export function stockLst(data) {
  return request.get('supplier/stock/lst', data)
}

export function stockList(data) {
  return request.get('supplier/stock/list', data)
}

export function stockCreate(data) {
  return request.post('supplier/stock/save', data)
}

export function stockDetail(id, data = {}) {
  return request.get('supplier/stock/detail/' + id, data)
}

export function getStockSn(data = {}) {
  return request.get('supplier/stock/getStockSn', data)
}
